Optimal. Leaf size=114 \[ \frac{\left (6 a^2-6 a b+b^2\right ) \sin ^5(c+d x)}{5 d}+\frac{a^2 \sin (c+d x)}{d}+\frac{(a-b)^2 \sin ^9(c+d x)}{9 d}-\frac{2 (a-b) (2 a-b) \sin ^7(c+d x)}{7 d}-\frac{2 a (2 a-b) \sin ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0989362, antiderivative size = 114, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {3676, 373} \[ \frac{\left (6 a^2-6 a b+b^2\right ) \sin ^5(c+d x)}{5 d}+\frac{a^2 \sin (c+d x)}{d}+\frac{(a-b)^2 \sin ^9(c+d x)}{9 d}-\frac{2 (a-b) (2 a-b) \sin ^7(c+d x)}{7 d}-\frac{2 a (2 a-b) \sin ^3(c+d x)}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3676
Rule 373
Rubi steps
\begin{align*} \int \cos ^9(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \left (1-x^2\right )^2 \left (a-(a-b) x^2\right )^2 \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \left (a^2-2 a (2 a-b) x^2+\left (6 a^2-6 a b+b^2\right ) x^4-2 \left (2 a^2-3 a b+b^2\right ) x^6+(a-b)^2 x^8\right ) \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac{a^2 \sin (c+d x)}{d}-\frac{2 a (2 a-b) \sin ^3(c+d x)}{3 d}+\frac{\left (6 a^2-6 a b+b^2\right ) \sin ^5(c+d x)}{5 d}-\frac{2 (a-b) (2 a-b) \sin ^7(c+d x)}{7 d}+\frac{(a-b)^2 \sin ^9(c+d x)}{9 d}\\ \end{align*}
Mathematica [A] time = 0.608363, size = 116, normalized size = 1.02 \[ \frac{630 \left (63 a^2+14 a b+3 b^2\right ) \sin (c+d x)+420 \left (21 a^2-b^2\right ) \sin (3 (c+d x))+252 \left (9 a^2-4 a b-b^2\right ) \sin (5 (c+d x))+35 (a-b)^2 \sin (9 (c+d x))+45 (9 a-b) (a-b) \sin (7 (c+d x))}{80640 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.093, size = 183, normalized size = 1.6 \begin{align*}{\frac{1}{d} \left ({b}^{2} \left ( -{\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{3} \left ( \cos \left ( dx+c \right ) \right ) ^{6}}{9}}-{\frac{\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{6}}{21}}+{\frac{\sin \left ( dx+c \right ) }{105} \left ({\frac{8}{3}}+ \left ( \cos \left ( dx+c \right ) \right ) ^{4}+{\frac{4\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{3}} \right ) } \right ) +2\,ab \left ( -1/9\,\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{8}+{\frac{\sin \left ( dx+c \right ) }{63} \left ({\frac{16}{5}}+ \left ( \cos \left ( dx+c \right ) \right ) ^{6}+6/5\, \left ( \cos \left ( dx+c \right ) \right ) ^{4}+8/5\, \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) } \right ) +{\frac{{a}^{2}\sin \left ( dx+c \right ) }{9} \left ({\frac{128}{35}}+ \left ( \cos \left ( dx+c \right ) \right ) ^{8}+{\frac{8\, \left ( \cos \left ( dx+c \right ) \right ) ^{6}}{7}}+{\frac{48\, \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{35}}+{\frac{64\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{35}} \right ) } \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.12922, size = 140, normalized size = 1.23 \begin{align*} \frac{35 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \sin \left (d x + c\right )^{9} - 90 \,{\left (2 \, a^{2} - 3 \, a b + b^{2}\right )} \sin \left (d x + c\right )^{7} + 63 \,{\left (6 \, a^{2} - 6 \, a b + b^{2}\right )} \sin \left (d x + c\right )^{5} - 210 \,{\left (2 \, a^{2} - a b\right )} \sin \left (d x + c\right )^{3} + 315 \, a^{2} \sin \left (d x + c\right )}{315 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.51343, size = 290, normalized size = 2.54 \begin{align*} \frac{{\left (35 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{8} + 10 \,{\left (4 \, a^{2} + a b - 5 \, b^{2}\right )} \cos \left (d x + c\right )^{6} + 3 \,{\left (16 \, a^{2} + 4 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} + 4 \,{\left (16 \, a^{2} + 4 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + 128 \, a^{2} + 32 \, a b + 8 \, b^{2}\right )} \sin \left (d x + c\right )}{315 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]